package com.xmcc.dto;

import lombok.*;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Setter
@Getter
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class SysRoleDto implements Serializable {

    private Integer id;

    @NotBlank(message = "角色名称不能为空")
    @Length(min =3,max = 20,message = "角色名称长度在3~20位之间")
    private String name;

    @NotNull(message = "类型，1：管理员角色，2：其它角色")
    @Min(1)
    @Max(2)
    private Integer type;

    @NotNull(message = "状态，1：可用，0：冻结")
    @Min(0)
    @Max(1)
    private Integer status;

    private String remark;


}
